class CalendarController < ApplicationController
  
  def index
    @month = (params[:month] || Time.zone.now.month).to_i
    @year = (params[:year] || Time.zone.now.year).to_i

    @shown_month = Date.civil(@year, @month)

    @event_strips = Event.event_strips_for_month(@shown_month)
  end
  
  def new
  @event = Event.new(params[:event])
  end
  
def create_event
@event = Event.new(params[:event])
if @event.save
redirect_to(:action => 'index')
else
render(:action => 'new')
end
end
  
def edit
@event = Event.find(params[:id])
end
  
end